#include <iostream>
#include <fstream>
using namespace std;

int a[1000005];
int n;

int search(int a[], int p, int q, int x)
{ for(int i=p; i<=q; i++)
    if(x==a[i]) return i;
  return -1;
}    

int main()
{ ifstream fin("data10M.in");
    
  fin >> n;
  for(int i=0; i<n; i++)
    fin >> a[i];

  fin.close();

  int x;
  cin >> x;
  while(x>=0)
  { int p = search(a,0,n-1,x);
    if(p>=0) cout << "Yes " << p << endl;
    else cout << "No" << endl;
    cin >> x;
  }
  
  return 0;
}
  


